#include "MaskFromRectangle.h"


MaskFromRectangle::MaskFromRectangle(int width, int height) : Filter(1,1), width(width), height(height)
{
}


MaskFromRectangle::~MaskFromRectangle(void)
{
}

void MaskFromRectangle::Process()
{
	outputs[0] = cv::Mat(height, width, CV_8UC1, cv::Scalar(0));

	int *p = inputs[0]->ptr<int>(0);
	cv::Rect rect = cv::Rect(p[0], p[1], p[2], p[3]);

	outputs[0](rect) = cv::Scalar(1);
}